package com.sample.rx3.libs.rxjava;

import io.reactivex.rxjava3.core.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Header;
import retrofit2.http.POST;

public interface SystemServerImpl {
    /**
     * POST 获取字典列表
     * http://60.165.62.186:9081/system/dict/listItem
     * 获取字典列表，用于下拉数据，typeCode（字典标识）对应后台
     * <p>
     * HEADERS
     * Authorization Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyTmFtZSI6IjEzODEyMzQ1Njc4IiwiZXhwIjoxNjE0NDEwMDY2LCJpYXQiOjE2MTQ0MDI4NjZ9.AD3n2tV-7Z93DyR_lcrNIk8I12cIqFyDyocapUkSX9k
     * BODY urlencoded
     * typeCode bank_type
     * 字典标识
     */
    @FormUrlEncoded
    @POST("dict/listItem")
    Observable<String> dictTrans(@Header("Authorization") String token, @Field("typeCode") String typeCode);

    /**
     * POST 获取系统参数值
     * http://60.165.62.186:9081/system/param/getParam
     * HEADERS
     * Authorization Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyTmFtZSI6IjEzODEyMzQ1Njc4IiwiZXhwIjoxNjE0NDEwMDY2LCJpYXQiOjE2MTQ0MDI4NjZ9.AD3n2tV-7Z93DyR_lcrNIk8I12cIqFyDyocapUkSX9k
     * BODY urlencoded
     * paramKey integralRate
     * 参数键
     */
    @FormUrlEncoded
    @POST("param/getParam")
    Observable<String> systemParam(@Header("Authorization") String token, @Field("paramKey") String paramKey);
}
